package com.school.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.school.mapper.SposMapper;
import com.school.pojo.Spos;
import com.school.service.SposService;

@Service
@Transactional
public class SposServiceImpl implements SposService{

	@Autowired
	private SposMapper sposMapper;
	
	@Override
	public List<Spos> findAll(Spos t, int page, int pageSize) {
		PageHelper.startPage(page,pageSize);
		return sposMapper.findAll();
	}

	@Override
	public int add(Spos t) {
		
		return sposMapper.add(t);
	}

	@Override
	public Spos findbyId(int id) {
		
		return sposMapper.findbyId(id);
	}

	@Override
	public int edit(Spos t) {
		
		return sposMapper.edit(t);
	}

	@Override
	public int delbatch(int[] id) {
		
		return sposMapper.delbatch(id);
	}

}
